import Cost from '../components/back/ygr/Cost.vue'
import Financial from '../components/back/ygr/Financial.vue'
import Profit from '../components/back/ygr/Profit.vue'
import Salary from '../components/back/ygr/Salary.vue'
const routes = [{
    path: '/finance',
    name: 'Finance',
    component: () => import('../views/back/Finance.vue'),
    children: [{
        path: '/cost',
        components: {
          Cost: Cost
        },
        meta: {
          required: true,
          role: ['经理','会计'],
          isBack:true
        }
      },
      {
        path: '',
        components: {
          Financial:Financial
        },
         meta: {
          required: true,
          role: ['经理','会计'],
          isBack:true
        }
      },
      {
        path: '/profit',
        name: 'Profit',
        components: {
          Profit
        },
         meta: {
          required: true,
          role: ['经理','会计'],
          isBack:true
        }
      },
      {
        path: '/salary',
        name: 'Salary',
        components: {
          Salary
        },
         meta: {
          required: true,
          role: ['经理','会计'],
          isBack:true
        }
      }
    ]
  },
  {
    path: '/foods',
    name: 'Foods',
    component: () => import('../views/back/Foods.vue'),
     meta: {
      required: true,
      role: ['经理','主管'],
      isBack:true
    },
  },
  {
    path: '/info',
    name: 'Info',
    component: () => import('../views/back/Info.vue'),
     meta: {
      required: true,
      role: ['经理','主管'],
      isBack:true
    },
  },
  {
    path: '/inventory',
    name: 'Inventory',
    component: () => import('../views/back/Inventory.vue'),
    meta: {
      required: true,
      role: ['经理','主管'],
      isBack:true
    },
  },
  {
    path: '/operate',
    name: 'Operate',
    component: () => import('../views/back/Operate.vue'),
    meta: {
      required: true,
      role: ['经理','主管'],
      isBack:true
    },
  },
  {
    path: '/system',
    name: 'System',
    component: () => import('../views/back/System.vue'),
    meta: {
      required: true,
      role: ['经理'],
      isBack:true
    },
  }
];
export default routes;


